package com.xy.entity.product;

import com.alibaba.fastjson.annotation.JSONField;
import com.xy.common.jpa.AbstractTimestampEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;


@Entity
@Data
@Table(name = "parameter")
public class Parameter extends AbstractTimestampEntity{


    @ApiModelProperty(value="键",name="pkey")
    private String pkey;
    @ApiModelProperty(value="值",name="pvalue")
    private String pvalue;
    @ApiModelProperty(value="标准：1主要参数 2次要参数",name="premark")
    private int premark;

    @JSONField(serialize = false)
    @JoinColumn(name = "product_id")
    @ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
    private Product product;
}
